![]() |
PATH![]() |
![]() ![]() |
Uploads a file or directory synchronously to an FTP URL.
OSStatus URLSimpleUpload (
char* url,
FSSpec* source,
URLOpenFlags openFlags,
URLSystemEventProcPtr eventProc,
void* userContext);
The URLSimpleUpload function uploads data synchronously to the specified FTP URL from the specified file or directory and does not return until the upload is complete. The URLSimpleUpload function yields time to other threads. Your application should call URLSimpleUpload from a thread other than the main thread so that other processes have time to run.
If you want a progress indicator to be displayed during the upload, specify kURLDisplayProgressFlag in the openFlags parameter. The URL Access Manager uses a modal dialog box to display the progress indicator.
If your application has multiple threads, it can call URLSimpleUpload multiple times, but if it calls URLSimpleUpload with kURLDisplayProgressFlag set in openFlags when the URL Access Manager is already displaying a modal dialog box, URLSimpleUpload returns the error kURLProgessAlreadyDisplayedError .
Call URLUpload if you need to set properties or URLOpen if you need to control the upload process.